		<div id="content">
			<div class="c1">
				<div class="controls">
					<?php include('topnav.php'); ?>
					<?php include(APPPATH.'/views/profile_box.php'); ?>
					
				</div>
				<div class="tabs">
					<div id="tab-1" class="tab">
						<article>
							<div class="text-section">
								<h1>合同列表</h1>
								<p>在此管理合同</p>
							</div>

							<div class="threebutton">

							<br>
								<form action="" method="post">  		
								<input class="large button orange" type="submit" value="删除合同" name="delete">
							</div>
								<br>
							<div class="threebutton">

							<?php
								echo '<table class="admintable" width="100%">';
								echo '<tr align="left"><th class="adminth">全选<th class="adminth">&nbsp;<th class="adminth">项目名称<th class="adminth">项目代号<th class="adminth">委托方<th class="adminth">承担方<th class="adminth">开始日期<th class="adminth">截止日期<th class="adminth">总经费<th class="adminth">经费类型<th class="adminth">进出款<th class="adminth">经费卡号<th class="adminth">经费来源<th class="adminth">是否免税<th class="adminth">一式几份<th class="adminth">密级<th class="adminth">状态';

								$sql = "select * from contract";
								$res = $this->db->query($sql);
								foreach($res->result() as $row)
								{
									if($row->Status == "待审批" || $row->Status == "未通过") {
										echo '<tr><td class="admincls0"><input type="checkbox" name="check[]" value="'.$row->Contract_ID.'"/>';
										echo '<td class="admincls0"><input class="button orange" type="button" name="edit" value="修改" id="'.$row->Contract_ID.','.$row->Project_Name.','.$row->Client.','.$row->Bearer.','.$row->LeaderID.','.$row->StartTime.','.$row->EndTime.','.$row->FundAmount.','.$row->FundType.','.$row->InOutMark.','.$row->FundCardNum.','.$row->FundSource.','.$row->IsDutyFree.','.$row->CopyAmount.','.$row->SecClass.','.$row->Status.'" onclick="alertEdit(this.id);">';
									}
									else {
										echo '<tr><td class="admincls0">&nbsp;';
										echo '<td class="admincls0">&nbsp;';
									}
									
									echo '<td class="admincls0">'.$row->Contract_ID;
									echo '<td class="admincls0">'.$row->Project_Name;
									echo '<td class="admincls0">'.$row->Client;
									echo '<td class="admincls0">'.$row->Bearer;
									echo '<td class="admincls0">'.$row->StartTime;
									echo '<td class="admincls0">'.$row->EndTime;
									echo '<td class="admincls0">'.$row->FundAmount;
									echo '<td class="admincls0">'.$row->FundType;
									echo '<td class="admincls0">'.$row->InOutMark;
									echo '<td class="admincls0">'.$row->FundCardNum;
									echo '<td class="admincls0">'.$row->FundSource;
									echo '<td class="admincls0">'.$row->IsDutyFree;
									echo '<td class="admincls0">'.$row->CopyAmount;
									echo '<td class="admincls0">'.$row->SecClass;
									echo '<td class="admincls0">'.$row->Status;
								}

								echo '</table>';
								
							?>
							</form>
							<script>
							function alertEdit(id) {
								var strs= new Array();
								strs=id.split(",");
								document.getElementById('eContract_ID').value = strs[0];
								document.getElementById('eProject_Name').value = strs[1];
								document.getElementById('eClient').value = strs[2];
								document.getElementById('eBearer').value = strs[3];
								document.getElementById('eLeaderID').value = strs[4];
								document.getElementById('eStartTime').value = strs[5];
								document.getElementById('eEndTime').value = strs[6];
								document.getElementById('eFundAmount').value = strs[7];
								document.getElementById('eFundType').value = strs[8];
								document.getElementById('eInOutMark').value = strs[9];
								document.getElementById('eFundCardNum').value = strs[10];
								document.getElementById('eFundSource').value = strs[11];
								document.getElementById('eIsDutyFree').value = strs[12];
								document.getElementById('eCopyAmount').value = strs[13];
								//document.getElementById('eSecClass').value = strs[14];
								document.getElementById('eStatus').value = strs[15];
								art.dialog({
									title:'修改',
		    						lock: true,
		    						background: '#fff', // 背景色
		    						opacity: 0.87,	// 透明度
									content: document.getElementById('conEdit'),
									id: 'EF893L'});
							}
							</script>
							</div>
							
						</article>
					</div>
				</div>
			</div>
		</div>

<form style="display:none" id="conEdit" action="" name="conEdit" method="post">
	<table>
		<tr>
			<td>Contract_ID(*):
			<td><input name="eContract_ID" id="eContract_ID" type="text" readonly/>
		<tr>
			<td>Project_Name(*):
			<td><input name="eProject_Name" id="eProject_Name" type="text" />
		<tr>
			<td>Client(*):
			<td><input name="eClient" id="eClient" type="text" />
		<tr>
			<td>Bearer(*):
			<td><input name="eBearer" id="eBearer" type="text" />
		<tr>
			<td>LeaderID(*):
			<td><input name="eLeaderID" id="eLeaderID" type="text" readonly/>
		<tr>
			<td>StartTime(*):
			<td><input name="eStartTime" id="eStartTime" type="text" />
		<tr>
			<td>EndTime(*):
			<td><input name="eEndTime" id="eEndTime" type="text" />
		<tr>
			<td>FundAmount(*):
			<td><input name="eFundAmount" id="eFundAmount" type="text" />
		<tr>
			<td>FundType(*):
			<td><input name="eFundType" id="eFundType" type="text" />
		<tr>
			<td>InOutMark(*):
			<td><input name="eInOutMark" id="eInOutMark" type="text" />
		<tr>
			<td>FundCardNum:
			<td><input name="eFundCardNum" id="eFundCardNum" type="text" />
		<tr>
			<td>FundSource(*):
			<td><input name="eFundSource" id="eFundSource" type="text" />
		<tr>
			<td>IsDutyFree(*):
			<td>
				<select name="eIsDutyFree" id="eIsDutyFree" >
					<option value='是'>是</option>
					<option value='否'>否</option>
					</select>
		<tr>
			<td>CopyAmount(*):
			<td><input name="eCopyAmount" type="text" id="eCopyAmount" />
		<tr>
			<td>Status:
			<td>
				<input name="eStatus" id="eStatus" type="text" readonly />

		<tr>
			<td>
			<td><input type="submit" name="conEdit"/>
	</table>
</form>